import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter);
//定义了路由


// @ 代表src 
// import HelloWorld from '@/components/HelloWorld.vue'
// import ToDoList from '@/components/ToDoList.vue'
// import DemoTable from '@/components/DemoTable.vue'
// import DeptList from '@/views/dept/dept_list.vue'

//定义了路由
let router = new VueRouter({
	  routes: [
		  {
			path: '/helloworld',
			component: ()=>import('@/components/HelloWorld.vue')
		}, {
			path: '/todolist',
			component:  ()=>import('@/components/ToDoList.vue')
		},
		{
			path: '/table',
			component:  ()=>import('@/components/DemoTable.vue')
		},
		{
			path: '/dept',
			component: ()=>  import('@/views/dept') 
		},
		{
			path: '/disease',
			component: ()=>  import('@/views/disease') 
		}
	]
	
})


// router.beforeEach()


// 导出模块，
export default router
